package com.spring.focus.readproperties;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.spring.focus.ioc.GreetingService;

public class MainTest {
	
	public static void main(String [] args){
		 ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
	        /**调用getBean方法获取bean对象 需要强制造型*/
		 SpsProperties spsProperties = (SpsProperties) ac.getBean("spsProperties");
	        /**调用对象相应的方法*/
		 String properties1=spsProperties.getProperties1();
		 String properties2=spsProperties.getProperties2();
		 System.out.println(properties1+"======="+properties2);
	}

}
